#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
version: 02/02/2012 r1

@authors:   Carlos Sancho nº12064
            Armando Gomes nº12067
'''

import sys
import time
import PyRNG

if (len(sys.argv) not in (2, 3)): 
    print 'Invalid Number of Args!'
    print 'usage: python PyRNG.py <number_of_runs> [-v] (optional - verbose mode)' 
    sys.exit(1) 

try:
    map(int, sys.argv[1])
except ValueError:
    print 'Invalid Integer!'
    sys.exit(1)

try:
    if(sys.argv[2] == '-v'):
        verbose = True
except IndexError:
    verbose = False

rndgenerator = PyRNG.PyRNG(int(sys.argv[1]), verbose)
rndgenerator.run()
